﻿using Quartz.Net.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Quartz.Net.Factory;
using Quartz.Net.Model;

namespace Quartz.Net.JobServer
{
    class TaskManagerServiceBus
    {
        public void Start()
        {
            //配置信息读取
            //ConfigInit.InitConfig();
            factoryClass.InsertRrrorlog("调度服务启动", "调度服务启动", LogsStatus.Info);
            QuartzHelper.InitScheduler();
            QuartzHelper.StartScheduler();
        }

        public void Stop()
        {
            factoryClass.InsertRrrorlog("调度服务停止", "调度服务停止", LogsStatus.Info);
            QuartzHelper.StopSchedule();
            System.Environment.Exit(0);
        }
    }
}
